#include <ucontext.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/time.h>
#include "thread.h"
#include <assert.h>
#include <valgrind/valgrind.h>

#define CHK(X) if((X) == NULL) { perror(#X); exit(0); }
#define STACKSIZE 64*1024


void timer_reset();

void timer_cut();

int timer();

int create_sigaction(void (*handler)(int, siginfo_t *, void*), sigset_t *preempt_set);


